/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2015
 */

package com.environment_pro.monitor.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.environment_pro.monitor.util.StaticUtil;

/**
 * @author yangfeng 
 * @version 1.0
 * @since 1.0
 */


public class TbDeviceLoad implements java.io.Serializable{

	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "TbDeviceLoad";
	public static final String ALIAS_ID = "设备编码";
	public static final String ALIAS_DEV_MAC_ADDRESS = "devMacAddress";
	public static final String ALIAS_DEV_TYPE_CODE = "设备属性编码";
	public static final String ALIAS_DEV_PARA_CODE = "设备类型参数标识";
	public static final String ALIAS_DEV_PARA_UNIT = "单位符号";
	public static final String ALIAS_DEV_VALUE = "设备值";
	public static final String ALIAS_LOAD_TIME = "数据采集时间";
	public static final String ALIAS_ADD_TIME = "入库时间";
	
	
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	private java.lang.Integer id;

	private java.lang.String devMacAddress;

	private java.lang.String devTypeCode;

	private java.lang.String devParaCode;

	private java.lang.String devParaUnit;

	private java.lang.String devValue;

	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private  java.util.Date loadTime;

	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private  java.util.Date addTime;

	//columns END

	//date String
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private java.util.Date loadTimeBegin;

	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private java.util.Date loadTimeEnd;
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private java.util.Date addTimeBegin;

	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private java.util.Date addTimeEnd;

	public TbDeviceLoad(){
	}

	public TbDeviceLoad(
		java.lang.Integer id
	){
		this.id = id;
	}

	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	public java.lang.Integer getId() {
		return this.id;
	}
	public void setDevMacAddress(java.lang.String value) {
		this.devMacAddress = value;
	}
	
	public java.lang.String getDevMacAddress() {
		return this.devMacAddress;
	}
	public void setDevTypeCode(java.lang.String value) {
		this.devTypeCode = value;
	}
	
	public java.lang.String getDevTypeCode() {
		return this.devTypeCode;
	}
	public void setDevParaCode(java.lang.String value) {
		this.devParaCode = value;
	}
	
	public java.lang.String getDevParaCode() {
		return this.devParaCode;
	}
	public void setDevParaUnit(java.lang.String value) {
		this.devParaUnit = value;
	}
	
	public java.lang.String getDevParaUnit() {
		return this.devParaUnit;
	}
	public void setDevValue(java.lang.String value) {
		this.devValue = value;
	}
	
	public java.lang.String getDevValue() {
		return this.devValue;
	}

	public void setLoadTimeBegin(java.util.Date value) {
		this.loadTimeBegin = value;
	}
	
	public java.util.Date getLoadTimeBegin() {
		return this.loadTimeBegin;
	}

	public void setLoadTimeEnd(java.util.Date value) {
		this.loadTimeEnd = value;
	}
	
	public java.util.Date getLoadTimeEnd() {
		return this.loadTimeEnd;
	}
	
	public void setLoadTime(java.util.Date value) {
		this.loadTime = value;
	}
	
	public java.util.Date getLoadTime() {
		return this.loadTime;
	}

	public void setAddTimeBegin(java.util.Date value) {
		this.addTimeBegin = value;
	}
	
	public java.util.Date getAddTimeBegin() {
		return this.addTimeBegin;
	}

	public void setAddTimeEnd(java.util.Date value) {
		this.addTimeEnd = value;
	}
	
	public java.util.Date getAddTimeEnd() {
		return this.addTimeEnd;
	}
	
	public void setAddTime(java.util.Date value) {
		this.addTime = value;
	}
	
	public java.util.Date getAddTime() {
		return this.addTime;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("DevMacAddress",getDevMacAddress())
			.append("DevTypeCode",getDevTypeCode())
			.append("DevParaCode",getDevParaCode())
			.append("DevParaUnit",getDevParaUnit())
			.append("DevValue",getDevValue())
			.append("LoadTime",getLoadTime())
			.append("AddTime",getAddTime())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof TbDeviceLoad == false) return false;
		if(this == obj) return true;
		TbDeviceLoad other = (TbDeviceLoad)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

